<?php

/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2021/12/15
 * Time: 11:03
 */
include_once '../tools/DbTools.php';
session_start();
include_once '../common/common.php';
$isLogin = getLoginStatus();
if (!$isLogin) {
    echo '尚未登陆，<a href="loginUi.php">请登录</a>';
    die;
}

$token = $_COOKIE['Token'];
$RealName = $_SESSION[$token]['RealName'];
$CardNo = $_SESSION[$token]['username'];

DbTools::init();
$Sql = "select CardMoney from bankcard where CardId=" . $_SESSION[$token]['CardId'];
$result = DbTools::select($Sql);
$money = $result[0]['CardMoney'];
?>

<!DOCTYPE html>
<html>

<head>
    <meta charset="utf-8">
    <title>用户中心</title>
</head>

<body>
    <h3>欢迎您,<?php echo $RealName ?>&nbsp; &nbsp;&nbsp; <a href="logout.php">退出登入</a></h3>
    卡号:<?php echo $CardNo; ?>,$<?php echo $money ?></p>
    <ul>
        <li><a href="moneyIn.php">存钱</a></li>
        <li><a href="../money/moneyOut.php">取钱</a></li>
        <li><a href="../money/transfer.php">转账</a></li>
    </ul>
</body>

</html>